import request from '@/utils/request';

// 创建学生
export function createStudent(data) {
  return request({
    url: '/student/student/create',
    method: 'post',
    data: data
  });
}

// 更新学生
export function updateStudent(data) {
  return request({
    url: '/student/student/update',
    method: 'put',
    data: data
  });
}

// 删除学生
export function deleteStudent(id) {
  return request({
    url: '/student/student/delete?id=' + id,
    method: 'delete'
  });
}

// 获得学生
export function getStudent(params) {
  return request({
    url: '/student/student/GetStudentByTeaId',
    method: 'get',
    params
  });
}

// 获得学生分页
export function getStudentPage(params) {
  return request({
    url: '/student/student/getTeaName',  // 确保这个 URL 是正确的
    method: 'get',
    params
  });
}

// 导出学生 Excel
export function exportStudentExcel(params) {
  return request({
    url: '/student/student/export-excel',
    method: 'get',
    params,
    responseType: 'blob'
  });
}

// 得到教师
export function getTeacherPage(params) {
  return request({
    url: '/teachers/T_teachers/page',
    method: 'get',
    params
  });
}
//观看学生打卡进度
export function getStudentClock(params) {
  return request({
    url: '/punchs/record/GetRecordcard',
    method: 'get',
    params
  });
}